//
//  SHPickerView.h
//  Soha
//
//  Created by 谭飞 on 2018/8/31.
//  Copyright © 2018年 LB. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SHPickerView : UIView<UIPickerViewDataSource, UIPickerViewDelegate>
@property (nonatomic, strong) UIPickerView *pickerView;
@property (nonatomic, strong) UIDatePicker *datePicker;

@property (nonatomic, assign) CGFloat contentHeight;
@property (nonatomic, assign) CGFloat titleHeight;
@property (nonatomic, strong) NSDate *selectDate;

// call back
@property (nonatomic, copy) void(^ sureCallback)(SHPickerView *pickerView, NSInteger selectRow);
@property (nonatomic, copy) void(^ handleBlock)(NSDate * selectDate);

// 初始化一个UIPickerView
- (instancetype)initWithTitle:(NSString *)title items:(NSArray *)items block:(void(^)(SHPickerView *pickerView, NSInteger selectRow))block;

// 初始化一个UIDatePicker
- (instancetype)initDatePickerWithTitle:(NSString *)title block:(void(^)(NSDate * selectDate))block;

- (void)show;

@end
